/**
 * @file   main.cpp
 * @author ywl <ywl@ywl-VirtualBox>
 * @date   Fri Oct  7 18:23:01 2022
 * 
 * @brief  An exam of doubly linked list.
 * 
 * 
 */

#include<iostream>
#include"DoubleLinkedList.h"

int main(int argc, char *argv[])
{
    // Create a doubly linked list.
    DoubleLinkedList<int> L;
    // Insert 1,2,3,4,5 to the list in sequence.
    for(int i = 1; i <= 5; ++i)
	L.push_back(i);
    // Print the list.
    L.printList();
    // Find item 3 in the list.
    DoubleLinkedList<int>::iterator iter =  L.find(L,3);
    // Delete iterator iter. 
    L.erase(iter);
    // Print the list again.
    L.printList();
    // Find item 3 in the list again.
    DoubleLinkedList<int>::iterator itr =  L.find(L,3);
    
    return 0;
}
